package com.mj.haier.rrskx.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;

import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The AzEorderTitle entity.
 * 源安装订单信息, 主键用 orderCode
 * @author ycm
 */
@ApiModel(description = "The AzEorderTitle entity. 源安装订单信息, 主键用 orderCode @author ycm")
@Entity
// @Table(name = "az_eorder_title")
// @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "azeordertitle")
public class AzEorderTitle implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 工单编号, 唯一
     */
    @NotNull
    @ApiModelProperty(value = "工单编号, 唯一", required = true)
    @Id
    @org.springframework.data.annotation.Id
    @Column(name = "order_code", nullable = false)
    private String orderCode;

    /**
     * 工贸编码, 分表键
     */
    @NotNull
    @ApiModelProperty(value = "工贸编码, 分表键", required = true)
    @Column(name = "trade_code", nullable = false)
    private String tradeCode;

    /**
     * HCC工单ID
     */
    @ApiModelProperty(value = "HCC工单ID")
    @Column(name = "hcc_wo_id")
    private String hccWoId;

    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名")
    @Column(name = "customer_name")
    private String customerName;

    /**
     * 登记时间(下单时间)
     */
    @ApiModelProperty(value = "登记时间(下单时间)")
    @Column(name = "enter_time")
    private Instant enterTime;

    /**
     * 关联工单号
     */
    @ApiModelProperty(value = "关联工单号")
    @Column(name = "service_info_id")
    private String serviceInfoId;

    /**
     * 订单原单号(网单单号)
     */
    @ApiModelProperty(value = "订单原单号(网单单号)")
    @Column(name = "source_order_id")
    private String sourceOrderId;

    /**
     * 网点86码
     */
    @ApiModelProperty(value = "网点86码")
    @Column(name = "server_info_code")
    private String serverInfoCode;

    /**
     * 网点名称
     */
    @ApiModelProperty(value = "网点名称")
    @Column(name = "server_info_name")
    private String serverInfoName;

    /**
     * 产品大类编码
     */
    @ApiModelProperty(value = "产品大类编码")
    @Column(name = "product_no")
    private String productNo;

    /**
     * 产品大类名称
     */
    @ApiModelProperty(value = "产品大类名称")
    @Column(name = "product_name")
    private String productName;

    /**
     * 产品型号编码
     */
    @ApiModelProperty(value = "产品型号编码")
    @Column(name = "product_model_no")
    private String productModelNo;

    /**
     * 产品型号名称
     */
    @ApiModelProperty(value = "产品型号名称")
    @Column(name = "product_model_name")
    private String productModelName;

    /**
     * 产品系列编码
     */
    @ApiModelProperty(value = "产品系列编码")
    @Column(name = "product_ser_no")
    private String productSerNo;

    /**
     * 产品系列描述
     */
    @ApiModelProperty(value = "产品系列描述")
    @Column(name = "product_ser_desc")
    private String productSerDesc;

    /**
     * 项目编码
     */
    @ApiModelProperty(value = "项目编码")
    @Column(name = "source_name_code")
    private String sourceNameCode;

    /**
     * 项目编码名称
     */
    @ApiModelProperty(value = "项目编码名称")
    @Column(name = "source_name")
    private String sourceName;

    /**
     * 海尔结单状态
     */
    @ApiModelProperty(value = "海尔结单状态")
    @Column(name = "haier_close_status")
    private String haierCloseStatus;

    /**
     * 海尔结单时间
     */
    @ApiModelProperty(value = "海尔结单时间")
    @Column(name = "haier_close_time")
    private Instant haierCloseTime;

    /**
     * 工程师工号a, 车辆结算对象
     */
    @ApiModelProperty(value = "工程师工号a, 车辆结算对象")
    @Column(name = "net_employee_info_id_1")
    private String netEmployeeInfoId1;

    /**
     * 工程师工号b, 车辆结算次要对象
     */
    @ApiModelProperty(value = "工程师工号b, 车辆结算次要对象")
    @Column(name = "net_employee_info_id_2")
    private String netEmployeeInfoId2;

    /**
     * 车辆分成比
     */
    @ApiModelProperty(value = "车辆分成比")
    @Column(name = "car_percent")
    private String carPercent;

    /**
     * 车队分成比
     */
    @ApiModelProperty(value = "车队分成比")
    @Column(name = "carsteam_percent")
    private String carsteamPercent;

    /**
     * 网点结单状态
     */
    @ApiModelProperty(value = "网点结单状态")
    @Column(name = "server_close_status")
    private String serverCloseStatus;

    /**
     * 网点结单时间
     */
    @ApiModelProperty(value = "网点结单时间")
    @Column(name = "server_close_time")
    private Instant serverCloseTime;

    /**
     * 操作费
     */
    @ApiModelProperty(value = "操作费")
    @Column(name = "operate_cost")
    private String operateCost;

    /**
     * 服务方式费
     */
    @ApiModelProperty(value = "服务方式费")
    @Column(name = "service_type_cost")
    private String serviceTypeCost;

    /**
     * 交通费
     */
    @ApiModelProperty(value = "交通费")
    @Column(name = "traffic_cost")
    private String trafficCost;

    /**
     * 材料费
     */
    @ApiModelProperty(value = "材料费")
    @Column(name = "meterial_cost")
    private String meterialCost;

    /**
     * 超长补贴费
     */
    @ApiModelProperty(value = "超长补贴费")
    @Column(name = "subidy_cost")
    private String subidyCost;

    /**
     * 补偿费
     */
    @ApiModelProperty(value = "补偿费")
    @Column(name = "compensatory_cost")
    private String compensatoryCost;

    /**
     * 服务奖惩费
     */
    @ApiModelProperty(value = "服务奖惩费")
    @Column(name = "reward_cost")
    private String rewardCost;

    /**
     * 费用合计
     */
    @ApiModelProperty(value = "费用合计")
    @Column(name = "fee_total_cost")
    private String feeTotalCost;

    /**
     * 是否结算，0:结算; 1:未结算
     */
    @ApiModelProperty(value = "是否结算，0:结算; 1:未结算")
    @Column(name = "is_settle")
    private Boolean isSettle;

    /**
     * 是否发布，0:发布; 1:未发布
     */
    @ApiModelProperty(value = "是否发布，0:发布; 1:未发布")
    @Column(name = "is_published")
    private Boolean isPublished;

    /**
     * 费用生成时间
     */
    @ApiModelProperty(value = "费用生成时间")
    @Column(name = "cost_time")
    private Instant costTime;


    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getOrderCode() {
        return orderCode;
    }

    public AzEorderTitle orderCode(String orderCode) {
        this.orderCode = orderCode;
        return this;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getTradeCode() {
        return tradeCode;
    }

    public AzEorderTitle tradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
        return this;
    }

    public void setTradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
    }

    public String getHccWoId() {
        return hccWoId;
    }

    public AzEorderTitle hccWoId(String hccWoId) {
        this.hccWoId = hccWoId;
        return this;
    }

    public void setHccWoId(String hccWoId) {
        this.hccWoId = hccWoId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public AzEorderTitle customerName(String customerName) {
        this.customerName = customerName;
        return this;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public Instant getEnterTime() {
        return enterTime;
    }

    public AzEorderTitle enterTime(Instant enterTime) {
        this.enterTime = enterTime;
        return this;
    }

    public void setEnterTime(Instant enterTime) {
        this.enterTime = enterTime;
    }

    public String getServiceInfoId() {
        return serviceInfoId;
    }

    public AzEorderTitle serviceInfoId(String serviceInfoId) {
        this.serviceInfoId = serviceInfoId;
        return this;
    }

    public void setServiceInfoId(String serviceInfoId) {
        this.serviceInfoId = serviceInfoId;
    }

    public String getSourceOrderId() {
        return sourceOrderId;
    }

    public AzEorderTitle sourceOrderId(String sourceOrderId) {
        this.sourceOrderId = sourceOrderId;
        return this;
    }

    public void setSourceOrderId(String sourceOrderId) {
        this.sourceOrderId = sourceOrderId;
    }

    public String getServerInfoCode() {
        return serverInfoCode;
    }

    public AzEorderTitle serverInfoCode(String serverInfoCode) {
        this.serverInfoCode = serverInfoCode;
        return this;
    }

    public void setServerInfoCode(String serverInfoCode) {
        this.serverInfoCode = serverInfoCode;
    }

    public String getServerInfoName() {
        return serverInfoName;
    }

    public AzEorderTitle serverInfoName(String serverInfoName) {
        this.serverInfoName = serverInfoName;
        return this;
    }

    public void setServerInfoName(String serverInfoName) {
        this.serverInfoName = serverInfoName;
    }

    public String getProductNo() {
        return productNo;
    }

    public AzEorderTitle productNo(String productNo) {
        this.productNo = productNo;
        return this;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getProductName() {
        return productName;
    }

    public AzEorderTitle productName(String productName) {
        this.productName = productName;
        return this;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductModelNo() {
        return productModelNo;
    }

    public AzEorderTitle productModelNo(String productModelNo) {
        this.productModelNo = productModelNo;
        return this;
    }

    public void setProductModelNo(String productModelNo) {
        this.productModelNo = productModelNo;
    }

    public String getProductModelName() {
        return productModelName;
    }

    public AzEorderTitle productModelName(String productModelName) {
        this.productModelName = productModelName;
        return this;
    }

    public void setProductModelName(String productModelName) {
        this.productModelName = productModelName;
    }

    public String getProductSerNo() {
        return productSerNo;
    }

    public AzEorderTitle productSerNo(String productSerNo) {
        this.productSerNo = productSerNo;
        return this;
    }

    public void setProductSerNo(String productSerNo) {
        this.productSerNo = productSerNo;
    }

    public String getProductSerDesc() {
        return productSerDesc;
    }

    public AzEorderTitle productSerDesc(String productSerDesc) {
        this.productSerDesc = productSerDesc;
        return this;
    }

    public void setProductSerDesc(String productSerDesc) {
        this.productSerDesc = productSerDesc;
    }

    public String getSourceNameCode() {
        return sourceNameCode;
    }

    public AzEorderTitle sourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
        return this;
    }

    public void setSourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
    }

    public String getSourceName() {
        return sourceName;
    }

    public AzEorderTitle sourceName(String sourceName) {
        this.sourceName = sourceName;
        return this;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getHaierCloseStatus() {
        return haierCloseStatus;
    }

    public AzEorderTitle haierCloseStatus(String haierCloseStatus) {
        this.haierCloseStatus = haierCloseStatus;
        return this;
    }

    public void setHaierCloseStatus(String haierCloseStatus) {
        this.haierCloseStatus = haierCloseStatus;
    }

    public Instant getHaierCloseTime() {
        return haierCloseTime;
    }

    public AzEorderTitle haierCloseTime(Instant haierCloseTime) {
        this.haierCloseTime = haierCloseTime;
        return this;
    }

    public void setHaierCloseTime(Instant haierCloseTime) {
        this.haierCloseTime = haierCloseTime;
    }

    public String getNetEmployeeInfoId1() {
        return netEmployeeInfoId1;
    }

    public AzEorderTitle netEmployeeInfoId1(String netEmployeeInfoId1) {
        this.netEmployeeInfoId1 = netEmployeeInfoId1;
        return this;
    }

    public void setNetEmployeeInfoId1(String netEmployeeInfoId1) {
        this.netEmployeeInfoId1 = netEmployeeInfoId1;
    }

    public String getNetEmployeeInfoId2() {
        return netEmployeeInfoId2;
    }

    public AzEorderTitle netEmployeeInfoId2(String netEmployeeInfoId2) {
        this.netEmployeeInfoId2 = netEmployeeInfoId2;
        return this;
    }

    public void setNetEmployeeInfoId2(String netEmployeeInfoId2) {
        this.netEmployeeInfoId2 = netEmployeeInfoId2;
    }

    public String getCarPercent() {
        return carPercent;
    }

    public AzEorderTitle carPercent(String carPercent) {
        this.carPercent = carPercent;
        return this;
    }

    public void setCarPercent(String carPercent) {
        this.carPercent = carPercent;
    }

    public String getCarsteamPercent() {
        return carsteamPercent;
    }

    public AzEorderTitle carsteamPercent(String carsteamPercent) {
        this.carsteamPercent = carsteamPercent;
        return this;
    }

    public void setCarsteamPercent(String carsteamPercent) {
        this.carsteamPercent = carsteamPercent;
    }

    public String getServerCloseStatus() {
        return serverCloseStatus;
    }

    public AzEorderTitle serverCloseStatus(String serverCloseStatus) {
        this.serverCloseStatus = serverCloseStatus;
        return this;
    }

    public void setServerCloseStatus(String serverCloseStatus) {
        this.serverCloseStatus = serverCloseStatus;
    }

    public Instant getServerCloseTime() {
        return serverCloseTime;
    }

    public AzEorderTitle serverCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
        return this;
    }

    public void setServerCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
    }

    public String getOperateCost() {
        return operateCost;
    }

    public AzEorderTitle operateCost(String operateCost) {
        this.operateCost = operateCost;
        return this;
    }

    public void setOperateCost(String operateCost) {
        this.operateCost = operateCost;
    }

    public String getServiceTypeCost() {
        return serviceTypeCost;
    }

    public AzEorderTitle serviceTypeCost(String serviceTypeCost) {
        this.serviceTypeCost = serviceTypeCost;
        return this;
    }

    public void setServiceTypeCost(String serviceTypeCost) {
        this.serviceTypeCost = serviceTypeCost;
    }

    public String getTrafficCost() {
        return trafficCost;
    }

    public AzEorderTitle trafficCost(String trafficCost) {
        this.trafficCost = trafficCost;
        return this;
    }

    public void setTrafficCost(String trafficCost) {
        this.trafficCost = trafficCost;
    }

    public String getMeterialCost() {
        return meterialCost;
    }

    public AzEorderTitle meterialCost(String meterialCost) {
        this.meterialCost = meterialCost;
        return this;
    }

    public void setMeterialCost(String meterialCost) {
        this.meterialCost = meterialCost;
    }

    public String getSubidyCost() {
        return subidyCost;
    }

    public AzEorderTitle subidyCost(String subidyCost) {
        this.subidyCost = subidyCost;
        return this;
    }

    public void setSubidyCost(String subidyCost) {
        this.subidyCost = subidyCost;
    }

    public String getCompensatoryCost() {
        return compensatoryCost;
    }

    public AzEorderTitle compensatoryCost(String compensatoryCost) {
        this.compensatoryCost = compensatoryCost;
        return this;
    }

    public void setCompensatoryCost(String compensatoryCost) {
        this.compensatoryCost = compensatoryCost;
    }

    public String getRewardCost() {
        return rewardCost;
    }

    public AzEorderTitle rewardCost(String rewardCost) {
        this.rewardCost = rewardCost;
        return this;
    }

    public void setRewardCost(String rewardCost) {
        this.rewardCost = rewardCost;
    }

    public String getFeeTotalCost() {
        return feeTotalCost;
    }

    public AzEorderTitle feeTotalCost(String feeTotalCost) {
        this.feeTotalCost = feeTotalCost;
        return this;
    }

    public void setFeeTotalCost(String feeTotalCost) {
        this.feeTotalCost = feeTotalCost;
    }

    public Boolean isIsSettle() {
        return isSettle;
    }

    public AzEorderTitle isSettle(Boolean isSettle) {
        this.isSettle = isSettle;
        return this;
    }

    public void setIsSettle(Boolean isSettle) {
        this.isSettle = isSettle;
    }

    public Boolean isIsPublished() {
        return isPublished;
    }

    public AzEorderTitle isPublished(Boolean isPublished) {
        this.isPublished = isPublished;
        return this;
    }

    public void setIsPublished(Boolean isPublished) {
        this.isPublished = isPublished;
    }

    public Instant getCostTime() {
        return costTime;
    }

    public AzEorderTitle costTime(Instant costTime) {
        this.costTime = costTime;
        return this;
    }

    public void setCostTime(Instant costTime) {
        this.costTime = costTime;
    }

    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AzEorderTitle azEorderTitle = (AzEorderTitle) o;
        if (azEorderTitle.getOrderCode() == null || getOrderCode() == null) {
            return false;
        }
        return Objects.equals(getOrderCode(), azEorderTitle.getOrderCode());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getOrderCode());
    }

    @Override
    public String toString() {
        return "AzEorderTitle{" +
            "orderCode='" + getOrderCode() + "'" +
            ", tradeCode='" + getTradeCode() + "'" +
            ", hccWoId='" + getHccWoId() + "'" +
            ", customerName='" + getCustomerName() + "'" +
            ", enterTime='" + getEnterTime() + "'" +
            ", serviceInfoId='" + getServiceInfoId() + "'" +
            ", sourceOrderId='" + getSourceOrderId() + "'" +
            ", serverInfoCode='" + getServerInfoCode() + "'" +
            ", serverInfoName='" + getServerInfoName() + "'" +
            ", productNo='" + getProductNo() + "'" +
            ", productName='" + getProductName() + "'" +
            ", productModelNo='" + getProductModelNo() + "'" +
            ", productModelName='" + getProductModelName() + "'" +
            ", productSerNo='" + getProductSerNo() + "'" +
            ", productSerDesc='" + getProductSerDesc() + "'" +
            ", sourceNameCode='" + getSourceNameCode() + "'" +
            ", sourceName='" + getSourceName() + "'" +
            ", haierCloseStatus='" + getHaierCloseStatus() + "'" +
            ", haierCloseTime='" + getHaierCloseTime() + "'" +
            ", netEmployeeInfoId1='" + getNetEmployeeInfoId1() + "'" +
            ", netEmployeeInfoId2='" + getNetEmployeeInfoId2() + "'" +
            ", carPercent='" + getCarPercent() + "'" +
            ", carsteamPercent='" + getCarsteamPercent() + "'" +
            ", serverCloseStatus='" + getServerCloseStatus() + "'" +
            ", serverCloseTime='" + getServerCloseTime() + "'" +
            ", operateCost='" + getOperateCost() + "'" +
            ", serviceTypeCost='" + getServiceTypeCost() + "'" +
            ", trafficCost='" + getTrafficCost() + "'" +
            ", meterialCost='" + getMeterialCost() + "'" +
            ", subidyCost='" + getSubidyCost() + "'" +
            ", compensatoryCost='" + getCompensatoryCost() + "'" +
            ", rewardCost='" + getRewardCost() + "'" +
            ", feeTotalCost='" + getFeeTotalCost() + "'" +
            ", isSettle='" + isIsSettle() + "'" +
            ", isPublished='" + isIsPublished() + "'" +
            ", costTime='" + getCostTime() + "'" +
            "}";
    }
}
